xen/arm: Release IRQ routed to a domain when it's destroying
authorJulien Grall <julien.grall@linaro.org>
Tue, 28 Apr 2015 14:32:27 +0000 (15:32 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 8 May 2015 14:41:58 +0000 (15:41 +0100)
commit28e8ad25bb3d34c761c281076d4c1777b92bbe5b
treed0eb34b3011d36db0d1faf314d9b4861199427c1
parent62fc96f6a221cc4263734281438ef1b46ab29c2a
xen/arm: Release IRQ routed to a domain when it's destroying

Xen has to release IRQ routed to a domain in order to reuse later.
Currently only SPIs can be routed to the guest so we only need to
browse SPIs for a specific domain.

Furthermore, a guest can crash and leave the IRQ in an incorrect state
(i.e has not been EOIed). Xen will have to reset the IRQ in order to
be able to reuse the IRQ later.

Introduce 2 new functions for release an IRQ routed to a domain:
    - release_guest_irq: upper level to retrieve the IRQ, call the GIC
    code and release the action
    - gic_remove_guest_irq: Check if we can remove the IRQ, and reset
    it if necessary

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/gic.c
xen/arch/arm/irq.c
xen/arch/arm/vgic.c
xen/include/asm-arm/gic.h
xen/include/asm-arm/irq.h